<script setup lang='ts'>
import { SuccessFilled, CircleCloseFilled } from '@element-plus/icons-vue'
defineOptions({
    name: ''
})
const props = defineProps<{
    isdialog: boolean
}>()
const tableData = ref([
    {
        date: '2016177',
        name: 1,
        address: '3.3%布洛芬缓释胶囊-哈尔滨制药厂',
        combination: 1,
        aaa: '',
        icon: 4
    },
    {
        date: '',
        name: 2,
        address: '阿莫西林',
        combination: 2,
        icon: 3
    },
    {
        date: '',
        name: 3,
        address: '感冒灵',
        combination: 3,
        icon: 3
    },
])
const isdialog = ref(true)
</script>

<template>
    <el-dialog v-model="isdialog" title="医嘱详情" width="1600">
        <el-table :data="tableData" border style="width: 100%">
            <el-table-column type="selection" width="55" />
            <el-table-column prop="date" label="单据编号" width="100">
            </el-table-column>
            <el-table-column prop="name" label="序号" width="55">
                <template #default="scope">
                    <span>{{ scope.row.name }}</span>
                </template>
            </el-table-column>
            <el-table-column prop="" label="" width="55">
                <template #default="scope">
                    <div class="combination-t" v-if="scope.row.combination == 1"></div>
                    <div class="combination-l" v-if="scope.row.combination == 2"></div>
                    <div class="combination-b" v-if="scope.row.combination == 3"></div>
                </template>
            </el-table-column>
            <el-table-column prop="address" label="医嘱名称" width="228">

            </el-table-column>
            <el-table-column prop="" label="单次剂量" width="100">
            </el-table-column>
            <el-table-column prop="" label="剂量单位" width="54"> </el-table-column>
            <el-table-column prop="" label="给药方式" width="85"></el-table-column>
            <el-table-column prop="" label="给药执行" width="85"></el-table-column>
            <el-table-column prop="" label="频次" width="54"></el-table-column>
            <el-table-column prop="" label="天数" width="54"></el-table-column>
            <el-table-column prop="" label="总量" width="54"></el-table-column>
            <el-table-column prop="" label="售价单位" width="54"></el-table-column>
            <el-table-column prop="" label="单价" width="54"></el-table-column>
            <el-table-column prop="" label="皮试" width="54"></el-table-column>
            <el-table-column prop="" label="皮试结果" width="85"></el-table-column>
            <el-table-column prop="" label="状态" width="54">
                <template #default="scope">
                    <el-icon v-if="scope.row.icon == 3" style="color: green;font-size: 22px;">
                        <SuccessFilled />
                    </el-icon>
                    <el-icon v-if="scope.row.icon == 4" style="color: red;font-size: 22px;">
                        <CircleCloseFilled />
                    </el-icon>
                </template>
            </el-table-column>
            <el-table-column prop="" label="执行科室" width="85"></el-table-column>
            <el-table-column prop="" label="医生嘱托"></el-table-column>
            <el-table-column prop="" label="诊断" width="200"></el-table-column>
        </el-table>
    </el-dialog>
</template>

<style lang='scss' scoped>
.input {
    width: 100%;
    height: 100%;

    :deep(.el-textarea__inner) {
        // height: 36px;
        box-shadow: none;
        // padding: none;
    }

    :deep(.el-textarea) {
        .el-textarea__inner {
            resize: none;
        }
    }
}

:deep(.el-table__row) {
    font-weight: 600;
    color: rgb(4, 153, 14);
}

.combination-t {
    width: 14px;
    height: calc(100% + 1px);
    position: absolute;
    border-top: 2px solid red;
    border-left: 2px solid red;
}

.combination-l {
    width: 14px;
    height: calc(100% + 1px);
    top: -30%;
    position: absolute;
    border-left: 2px solid red;
}

.combination-b {
    width: 14px;
    height: calc(100% + 1px);
    position: absolute;
    top: -30%;
    border-bottom: 2px solid red;
    border-left: 2px solid red;
}
</style>
